import { ConsoleLogger, Module } from '@nestjs/common'
import { getNowInChina } from 'src/common/time-helper'

export class CustomLogger extends ConsoleLogger {
    protected override getTimestamp(): string {
        return getNowInChina().format('YYYY-MM-DD HH:mm:ss')
    }
}

@Module({
    providers: [CustomLogger],
    exports: [CustomLogger]
})
export class CustomLoggerModule {}
